
#ifdef GL_ES
precision mediump float;
#endif

uniform vec2 u_resolution;
uniform float u_time;
uniform sampler2D u_texture_0;
uniform sampler2D u_texture_1;

float box(in vec2 _st,in vec2 _size){
    _size=vec2(.5)-_size;
    vec2 uv=smoothstep(_size,_size+vec2(.001),_st)*smoothstep(_size,_size+vec2(.001),vec2(1.)-_st);
    return uv.x*uv.y;
}

// color+=vec3(box(st,vec2(.1,.1)));

void main(){
    vec2 st=(gl_FragCoord.xy/u_resolution.xy);
    vec2 st2=(gl_FragCoord.xy/u_resolution.xy);
    vec3 color=vec3(0.,0.,0.);
    
    float s=fract(st.x*2.-u_time*.3);
    
    vec4 img=texture2D(u_texture_0,vec2(fract(s*4.),st.y));
    
    vec4 img2=texture2D(u_texture_1,vec2(st2.x,st2.y));
    
    float diffuse;
    float alpha;
    
    if(s<=.75){
        img.a=0.;
    }
    
    gl_FragColor=vec4(img.rgb,img.a);
}
